def format_percentage(decimal):
    percentage = decimal * 100  # 将小数转换为百分比
    return f"{percentage:.1f}%"


# 示例使用
# result = format_percentage(5.1234)
# print(result)  # 输出: 12.3%
